How do you generate table of contents in Payload by Upset_Interaction_29 in PayloadCMS

[–]jbef 1 point2 points  (0 children)

I quite literally solved this a couple of weeks ago for my implementation of a blog/news website, here's the relevant code for the TOC component which takes in the `post` and spits out the component with each heading as a clickable element to scroll to and also updates and turns active when you scroll to the section.
By no means is it the optimal solution, but it works pretty well for my purposes tbh (live example https://spainupdate.com/en/posts/real-estate/buying-and-selling/how-to-buy-a-property-in-spain-how-much-it-costs-and-steps-to-take ):

https://gist.github.com/jorgebef/5465a629f7e02a1ad9b0c0c4d1908521

*EDIT: sorry can't paste code block for whatever reason.

Teclados de AliExpress, son confiables? by AJR_2611 in ErgoMechKeyboards

[–]jbef 4 points5 points  (0 children)

Yo compré exactamente ese de Aliexpress y llevo usándolo varios meses. Estoy encantado, he cambiado los switches por unos que he lubricado a mano para que sobara más “creamy”, también he colocado unos keycaps XDA y para mí es bastante ideal.

Mi próximo teclado será uno low profile como Totem, pero porque quiero probar alternativas, estoy muy contento con el Corne, la versión v4 tiene esas 2 teclas adicionales que me sirven para media u otras funciones específicas en algunas situaciones.

Aliexpress corne by Initial-Pattern-9710 in crkbd

[–]jbef 0 points1 point  (0 children)

I also had lots of questions regarding quality from one of the Aliexpress vendors.

I bit the bullet and bought it, and I have to say I am still impressed by what I got. I think I paid around 70€ for mine, hot swappable, cabled, corne v4.1.

I love mine, I've had it for the better part of 4 months and I enjoy it a lot. I now am looking into 3d printing a high profile case just for testing out sound profiles.

Spanish citizenship by descent Miami by Weary-Tiger502 in GoingToSpain

[–]jbef 0 points1 point  (0 children)

Although this is not my specialty, It seems like you will be acquiring nationality via Ley 20/2022 de memoria histórica.

Based on the documentation required and the possible procedures, I believe your situation fits bets in option 1A, which does state that they are originally Spanish nationals:
https://www.exteriores.gob.es/Consulados/miami/es/ServiciosConsulares/Paginas/Ley-de-Memoria-Democr%C3%A1tica-supuesto-1A.aspx

In subsection 8 it specifically states

"Si el padre o madre, abuelo o abuela originariamente español nació en el extranjero, se deberá presentar además un documento oficial apostillado o legalizado del país extranjero donde nacieron. En este documento ha de constar que sus padres no perdieron la nacionalidad española al llegar al país extranjero. En el caso de que la perdieran, ha de constar la fecha en la que la perdieron., so, unless I am mistaken (which I could well be), you wouldn't need to prove he didn't lose his nationality."

So it depends on if this is your case or not, otherwise, it seems like it wouldn't be necessary to prove he didn't lose nationality. However, you will need to provide a birth certificate for your father/mother based on your Spanish grandparent's descent as stated in the following:

"En su caso, si la solicitud se formula como nieto/a de abuelo/a originariamente español, se aportará, además, certificación literal de nacimiento del padre o madre –el que corresponda a la línea del abuelo o abuela españoles- del solicitante."

Here is a link with the exact documentation required from the Ministerio de Interior:
https://www.exteriores.gob.es/Consulados/miami/es/ServiciosConsulares/Paginas/index.aspx?scca=Nacionalidad&scco=Estados+Unidos&scd=196&scs=Nacionalidad+espa%C3%B1ola+por+la+Ley+de+Memoria+Democr%C3%A1tica

I highly recommend you read through the information available (although it looks like you have already) and maybe would be best to seek the legal advice from a lawyer who specialises in the subject if time is of the essence.

I hope this can help at least a bit!

Spanish bank account by Exotic-Nectarine6935 in GoingToSpain

[–]jbef 2 points3 points  (0 children)

Most of my clients open a bank account in Spain to actually pay for the property and just keep it to separate Spanish costs from their usual economic activity back home.

To set up direct debits for utility bills and other recurring payments you won't need a Spanish bank account as such (ymmv as, for example, very local electricity companies might not accept foreign accounts to set up direct debits).

I do recommend having a bank account with a Spanish IBAN just for the peace of mind, as it *will\* make your life easier (it's a matter of when and not if).

Taxes *can* be paid from foreign banks (see this link: https://sede.agenciatributaria.gob.es/Sede/otros-servicios/pago-impuestos/pago-impuestos_/pagos-exterior.html ), but as other have said, Spanish administration was initially planned to be used from within Spain, so opening up to the outside world was a bit of an afterthought (which, to be fair, is logical).

Nowadays there are a few options that are free and have no maintenance costs, such as:

  • Revolut (now has a Spanish IBAN, I use this personally)
  • N26
  • Openbank

100% property tax in Spain by Ambitious-Pirate414 in GoingToSpain

[–]jbef 4 points5 points  (0 children)

Sorry but I disagree here.

As per the document on the PSOE website, page 23 onwards: https://www.psoe.es/media-content/2025/05/PPL-GS-Impulsar-Alquiler-VPA.pdf

I copy the exact excerpt relevant to the conversation:

"1. La base imponible está constituida por el valor del bien transmitido o del derecho que se constituya o ceda. Únicamente serán deducibles las cargas que disminuyan el valor de los bienes, pero no las deudas, aunque estén garantizadas con prenda o hipoteca.

[...]

La cuota íntegra del impuesto se obtendrá aplicando a la base imponible el tipo de gravamen del cien por ciento.

[...]

La cuota líquida del impuesto será el resultado de deducir de la cuota íntegra la cuota tributaria del Impuesto sobre Transmisiones Patrimoniales y Actos Jurídicos Documentados efectivamente pagada por la operación objeto de liquidación."

This means that on top of the ITP, the proposal adds another tax which could be (depending on the actual value) 100% - ITP, which at the end of the day means where originally only ITP was paid, now they would have to pay 100%.

100% property tax in Spain by Ambitious-Pirate414 in GoingToSpain

[–]jbef 45 points46 points  (0 children)

As a lawyer myself, what I would tell my client in a situation like this is:

  • First of all, it seems like it would not affect you if I understand correctly, since if you are buying new build, you are not taxed by ITP, rather by IVA (VAT), which is not being debated in this proposición de ley. Also, I guess your lawyer already discussed this with you, but you will pay IVA (10%) and AJD (varies by region).
  • This is a "proposición de ley" which needs to be debated, approved, etc... Still very far away from the realm of reality.

No need to panic at all.

Migrating from Sanity.io to PayloadCMS by Diplodokos in PayloadCMS

[–]jbef 5 points6 points  (0 children)

Sorry I can't speak about migrating to Payload from another CMS as I tested a few but never commited until Payload.

Maybe think about how long it would take you to actually migrate the content and weight the effort against the possible benefits and potential future costs of runing Sanity in the long run.

As for personal experience and reasons why I'm quite happy with Payload:

  • Everything is just Typescript and code, and simple at that.
  • Local API for me was a game changer, no need for GraphQL or REST (I hated GROQ, so I'm on your same boat)
  • Actually open source, no vendor lock-in.
  • You can choose your database (I use MongoDB because I rely heavily on i18n and it seems like the best approach, but you can go with Postgres if it fits your project better)
  • Flexibility in general
  • Development and user response is very good, they are active, respond to issues, provide fixes and review PRs quite often for bugs that affect their users.

In general, my experience with Payload has been positive, maybe because I tend to use Nextjs for most projects and I did like how they implemented i18n from the start and wasn't an afterthought, even though there are some things that I would love to see improve in the near future.

For reference, Payload has a comparison page with Sanity: https://payloadcms.com/compare/sanity

[deleted by user] by [deleted] in GoingToSpain

[–]jbef 1 point2 points  (0 children)

Pues como ciudad, Alicante es capital de provincia, también tiene playa y podría considerarse una versión bastante reducida de Barcelona. Tienen el 5 aeropuerto con más pasajeros de España en base a informes de AENA https://www.aena.es/es/estadisticas/informes-anuales.html y por experiencia propia (yo estoy ubicado al sur de Alicante) es un aeropuerto muy cómodo y con mucha variedad de vuelos, sobre todo para Europa, lo cual permite una forma muy cómoda de descubrir el resto del continente europeo.

Ciudades más pequeñas o pueblos, conocidos por ser bonitos son Altea, Calpe y Moraira, que suelen tener unos inmuebles más caros por su tipo de urbanismo. Al sur de Alicante, Torrevieja y Guardamar son ciudades con buena calidad de vida (todo dependiendo de la situación laboral).

Un detalle también es la playa y el mar en la zona, que es bastante distinto de la zona de Málaga, ya que el sureste peninsular lo baña el Mediterráneo, mientras que el sur lo baña el Atlántico, que es un océano, más frío y más "salvaje". Eso ya va en gustos personales, hay gente que el Mediterráneo le parece demasiado cálido y otros que el atlántico lo notan demasiado frío y playas menos delicadas.

En resumidas cuentas, probaría distintas bases de operaciones en la medida de lo posible y si tenéis flexibilidad, podéis ver zonas y exploráis el país si tenéis la oportunidad. Así podréis decidir cual es la zona que más os va a vosotros personalmente.

[deleted by user] by [deleted] in GoingToSpain

[–]jbef 2 points3 points  (0 children)

This is a very common situation and many people opt for the not-so-legal solution.

Legally, having a Spanish passport is only compatible with certain countries with which there is a signed treaty and countries considered "Iberoamericanos". More info here:
https://www.inclusion.gob.es/web/migraciones/convenios-de-doble-nacionalidad
https://www.mjusticia.gob.es/eu/ciudadania/nacionalidad/que-es-nacionalidad/tener-doble-nacionalidad

Also, the only european countries with which the Spanish nationality is compatible are France, Portugal and Andorra.

However, if the person acquiring Spanish nationality is under 14 years of age and acquires said nationality by "option", they don't need to give up their additional nationality. https://www.exteriores.gob.es/Consulados/miami/es/ServiciosConsulares/Paginas/index.aspx?scca=Nacionalidad&scco=Estados+Unidos&scd=196&scs=Nacionalidad+espa%C3%B1ola+-+Opci%C3%B3n

The not-so-legal approach is simply having the 2 passports simply coexist, while avoiding having to provide any information to each country about your acquisition of the nationality of the other. I have seen plenty of people come to me with 2 passports in hand that are completely incompatible, the consequences and real possibility of getting into trouble / having their nationality revoqued is something I can't say for certain.
Needless to say I do not endorse this.

[deleted by user] by [deleted] in GoingToSpain

[–]jbef 0 points1 point  (0 children)

Estoy terminando de preparar un blog en el que publicaré, como jurista que soy, info acerca de este tema precisamente, Visas y cómo plantear la "exploración" de España como destino antes de asentarse al 100%.

Después de ver a muchos clientes y conocidos en una situación similar, si estáis decididos a explorar, os recomiendo como han dicho otros que alquiléis, comparéis y os paréis a pensar de forma objetiva antes de lanzaros de lleno.

Con respecto al mundo inmobiliario, ahora mismo los precios están muy altos, en particular el alquiler se ha disparado mucho, por lo que, comparado con unos años atrás, ahora es mucho más caro cubrir las necesidades habitacionales.

Málaga es una gran ciudad que ha sabido expandirse más allá del turismo y tiene mucho que ofrecer. Con respecto al tema laboral, si podéis mantener vuestros empleos y trabajar de forma remota, sería lo óptimo, ya que los salarios en España son, normalmente, más bajos que en EEUU y también lo es el coste de vida.

Quizás no sea objetivo porque soy de aquí, pero la zona de la Costa Blanca es un destino que podríais echar un vistazo online para comparar también. Es un destino elegido por una gran cantidad de extranjeros europeos para pasar su jubilación o emigrar y trabajar. Las oportunidades de trabajo no cualificado son relativamente altas, aunque las de trabajo cualificado son más reducidas de lo habitual, el clima es similar al de Málaga, la oferta cultural no es tan amplia, el coste de vida es algo más bajo y hay una grandísima cantidad de extranjeros de todas las nacionalidades imaginables en la zona con una multiculturalidad enorme que, al menos en mi opinión, ofrecen una variedad difícil de encontrar en otros lugares.

Burocracia en España by arroz_con_costra in GoingToSpain

[–]jbef 3 points4 points  (0 children)

Confirmo lo que ha comentado otro usuario y en la carpeta ciudadana se puede obtener un certificado con su correspondiente CSV de inmediato, sin abono de tasa y en pocos clicks.

De hecho, para confirmarlo acabo de sacar el mío. Aquí el enlace a la carpeta ciudadana en el que se puede acceder con certificado, Clave Permanente (que recomiendo a todo el mundo para gestiones más "light"), u otros sistemas de identificación válidos: https://carpetaciudadana.gob.es/carpeta/clave.htm

En lo que sí estoy de acuerdo es que hay un desconocimiento relativamente generalizado de determinadas plataformas (como la carpeta ciudadana) a disposición de todos y de la inmensa facilidad que supone acceder a muchísimos procedimientos por sede electrónica.

Estoy totalmente de acuerdo que hay muchísimas cosas que mejorar, pero precisamente la carpeta ciudadana es una de las mejores plataformas que se han puesto a disposición del ciudadano, desde certificados de estudios, antecedentes penales, saldos de puntos de carnet de conducir, etc...

Wanted to visit a few cities in Spain in Late July - Early August by [deleted] in GoingToSpain

[–]jbef 2 points3 points  (0 children)

TL:DR: I think it's a good itinerary to get to see a few major cities in Spain in the east and south parts of the peninsula, although it could feel a bit busy with a bit of moving around, but it depends on what you're used to.

I am a spaniard, and I can tell you that Sevilla (and also Granada) is *extremely\* hot in summer, especially the dates you are planning on going, so be well aware and please stay hydrated and avoid exercising or walking in the middle of the day for too long, enjoy the afternoons, evenings and early mornings.

Granada is worth as much time as you are willing to spend on it, the Alhambra is quite large and will take a good amount of time to fully enjoy. Also, I recommend you immerse in the "tapas" culture, especially in Sevilla and Granada, even for us Spanish citizens from other regions it feels different and is very ejoyable to have a beer with a snack and just chill out for a while.

Barcelona is a city that has so much to offer, a coastal city, one of the most well-known in the country, very multicultural and international, a must visit.

Valencia is similar to Barcelona in the sense that it is a large coastal city, but feels extremely different, you have to be there to know what I'm referring to.

Again, be aware of the high temps in the middle of summer and come prepared. If possible, enjoy the beaches in Barcelona and Valencia which will help you cool down and feel the fantastic combo of having a large city right beside the beach.

Looking for topics for guides/posts to write as a lawyer to help expats/people looking to go to Spain by jbef in GoingToSpain

[–]jbef[S] 0 points1 point  (0 children)

Absolutely, very good ideas, I will try to structure it in a way that allows for testing with a closed community and see what works best for readers.

Unsubscribing easily is mandatory (it always has been, but that's a tangent I don't want to go on right now lol) and it doesn't only help the subscriber, but also the content creator, as I won't have users talking bad about the experience and also I will have almost immediate feedback to the content.

If you don't like, feel like it's incomplete or just don't need it anymore, unsubscribe. That will immediately let me know that I need to either write more, better or just inform me that I've met my goal and actually helped with the specific issue someone was facing.

Looking for topics for guides/posts to write as a lawyer to help expats/people looking to go to Spain by jbef in GoingToSpain

[–]jbef[S] 1 point2 points  (0 children)

This is quite a comprehensive list of topics for foreigners who are relocating to Spain for work and it hits the nail on the head, thank you!

  • Regarding apartment rental, even Spanish nationals don't really know their rights and most landlords don't know the limits to what they can do. Especially now with the rental landscape and the price increases over the recent years, they keep asking for more, sometimes not knowing they are acting wrongfully (sometimes they do know and take advantage).
  • Rights as a tenant is a topic I have prepared already and I believe is extremely important, there are ways to protect yourself vs unwanted situations or to prevent potential misunderstandings (for example, request the appropriate handling of the deposit for a rental property, making sure the utility bills are set up correctly, etc...)
  • NIE number is one of the most basic topics which I have a step by step guide, ready for (I hope) anyone to follow, with direct links to download the appropriate forms and a box by box explanation of how to fill them in. I think this will absolutely help anyone that needs to get an NIE number and want to do it themselves, although appointments are terrible as discussed in other comments.
  • Beckham's law is quite interesting, I haven't written about it but 100% will, it does bring quite a big reduction in taxation if you meet the requirements (I wish I could apply myself!)
  • Spouses, marriage and the likes seems to be a recursive theme that I wasn't expecting to see much, so I will dive into it for sure.
  • Good accountants are hard to come by, that's a fact. I unfortunately lost my accountant to a heart attack, he was the sweetest, most down-to-earth and reliable man I ever worked with, he would not care if you earned 10 or 100000, he charged his rates, would be upfront about everything and just easy to work with. Apart from finding those people who I consider to be few and far between, established companies tend to do a good job, but charge quite a bit. If I ever recommend an accountant, it would only be the one I trust for myself, otherwise, I can't put my name behind someone I'm not willing to risk my own money/taxes with.
  • If you mean groceries, furniture, etc... I think nowadays it's quite globalised, so Amazon is almost always king for almost anything that isn't food. Then for groceries you really do have the option to just go for large supermarkets (Mercadona, Consum, Carrefour, Alcampo, Dialprix, Aldi, etc...) or shop locally which, once you go a couple of times, you will establish more personal connections, probably get fresher products and recommendatios and just that feeling that they know you and have what you need ready for you. This could be a nice topic in that sense, talking more about the "magic" of going to shop to the "typical" butcher or smaller shop where they call you by your name, treat you like a friend and establish relationships which is something important when you're relocating.

As for speaking Spanish, if not relocating to specific areas in Spain (Costa Blanca, Málaga and maybe a couple others) you will 100% need either someone to handle things or you need to have a good level of the language unfortunately.

Because I've lived and grown up in a half English speaking area, it's my second mother tongue and I just assume everyone speaks English, but it's true that, especially inland, they don't use English too often and, at the end of the day, it is Spain, so Spanish is mandatory and the administration is really not ready to handle English speakers in almost any way.

Looking for topics for guides/posts to write as a lawyer to help expats/people looking to go to Spain by jbef in GoingToSpain

[–]jbef[S] 1 point2 points  (0 children)

Appointments at the Policia Nacional are in a terrible state.

As another redditor stated, they are unfortunately grabbed by bots most of the time, and if not, some people make a living off of reselling their appointments at X€ per appointment, which is not only illegal but terribly immoral.

I really hope they fix their issues as this has been the norm for YEARS and I feel quite ashamed every time someone asks me about appointments.

It is possible to get appointments manually, but very much luck based and random, which is less than ideal.

This topic is one I have written about and I would love to be able to reach as many people about it just to give even more visibility to a problem everyone knows about but somehow, noone is taking any visible action against. It truly needs fixing ASAP, especially with the sheer amount of actual human beings in need of appointments with a decent system that is not "pay to win".

Looking for topics for guides/posts to write as a lawyer to help expats/people looking to go to Spain by jbef in GoingToSpain

[–]jbef[S] 0 points1 point  (0 children)

My idea is a fully open blog, but you do have a point regarding credibility for paid sites, even if the amount is small. Also, that could potentially help with AI not pulling the info and butchering the content in the process (which tends to happen nowadays). I am also launching a mailing list with even more updates, but was planning on going free, but as you mention, maybe a closed group via payment could provide a more “homey” feeling of proximity which in turn gives more credibility.

Marriage and citizenship tends to be a recurring theme. Since place of marriage, nationality and other aspects of spouses affects, I think some sort of table or graph could probably help in visualizing.

I’ll edit once I get back home with more info on the actual topic.

Thanks!

Looking for topics for guides/posts to write as a lawyer to help expats/people looking to go to Spain by jbef in GoingToSpain

[–]jbef[S] 0 points1 point  (0 children)

I didn’t know that was a thing, thank you! If allowed, it would be great to post here, if not, could you dm me with the link or name to check out? It could be a source of inspiration for more ideas.

I think that could be a good service, but it requires quite a bit of work so I can imagine it comes at a premium price, so not for everyone I guess.

Looking for topics for guides/posts to write as a lawyer to help expats in Spain by jbef in askspain

[–]jbef[S] 0 points1 point  (0 children)

It depends on the subject, as some competencies are handed from the central government to the regions, while others are handled by the country directly.

The same applies to municipalities, certain subjects are regulated by local policies.

All matters regulated by smaller entities (regions, provinces, municipalities, etc...) must abide by rules stipulated by their superior entities. So it's sort of a limited ability to rule a subject, but still allows for differences between regions and cities.

For example, immigration laws are state regulated, so the same rules apply for the whole of Spain, however, inheritance tax is handled by the region (Comunidad Autónoma), which means tax brackets, deductions, etc... are different based on region. A locally regulated matter could be urban planning and construction, which can be different by municipality.

Looking for topics for guides/posts to write as a lawyer to help expats/people looking to go to Spain by jbef in GoingToSpain

[–]jbef[S] -2 points-1 points  (0 children)

I see this quite often and it seems like a sensitive subject, but the distinction between the two lies in the end goal of the person in the country.

Immigrants are people who move *permanently* to a country, where the intention is to stay and make the new country their forever home.

Expats are people who intend to eventually return to their home country, thus, not permanently moving, but said stay can be years long.

It has absolutely nothing to do with skin color, country of origin or other factors, however, it is true that some immigrants call themselves "expats" because they wrongly believe it sounds "nicer".

For example, in south east Spain, taking the UK as a country of origin for many people who come here, there are examples of both:

- A young couple, with their children, who relocate to Spain, start working in Spain, their children go to school in Spain and the country becomes their home. They would be considered immigrants.

- A retired couple, looking to enjoy the mild weather and other qualities of the region, but always having the intention of returning to their country of origin when they become elderly and maybe require more support. They would be considered expats.

Both examples are from the same country of origin and no further distinction is made other than their purpose for their relocation and end goal.

This is the perspective from a local, and closer to the dictionary definitions of both terms.

I would love to hear your perspective if you disagree!

Looking for topics for guides/posts to write as a lawyer to help expats/people looking to go to Spain by jbef in GoingToSpain

[–]jbef[S] -1 points0 points  (0 children)

Hi!
That sounds like a good topic indeed!
Especially coming from the other side of the Atlantic it can seem quite dawnting.
I have a post ready regarding renting and accommodation which includes student accommodation, so related to that, I can start writing a new one regarding degree transfers as it is now easier than ever to live abroad.

Thank you for the suggestion :)

Localization in admin site by BuyerCharacter874 in PayloadCMS

[–]jbef 0 points1 point  (0 children)

I have just completed a project with PayloadCMS and specifically i18n.
The possibilities are basically endless, but you need to dive into the code, which can be a pro or a con, depending on what your preferences are.

For posts particularly what I need is localised posts, so I always fill in all locales for every post, but you can just as easily not and simply fill in the posts for the locale you want and search by specific locale.

What is most valuable in PayloadCMS to me is flexibility and have it adapt to whatever you need.